package com.wjggy.core.common.springview;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;

/**
 * 
 *  <p>Description: 返回页面modelAndView生成器 </p>
 *  <p>Copyright:Copyright (c) 2012  </p>
 *  <p>Company:wjggy  </p>
 *  @author xiaofan.yu  
 *  @date   2012-1-8 下午08:45:03    
 *  @project  wjggy
 *  @version  1.0.0
 *  @see   
 *  @since 1.6
 */
public class ViewUtil {	
	public static String style;//系统设置样式  系统启动时候根据配置文件进行设置
	/**
	 * 
	 *  @describe 返回转发View
	 *  @param path
	 *  @return
	 */
	public static ModelAndView findView(String path){
		StringBuilder returnView=new StringBuilder(style);
		returnView.append(path);
		return new ModelAndView(returnView.toString());
	}
	/**
	 * 
	 *  @describe 返回跳转连接View
	 *  @param path
	 *  @return
	 */
	public static ModelAndView findRedirectView(String path){
		StringBuilder returnView=new StringBuilder();
		returnView.append(path);
		return new ModelAndView(new RedirectView(returnView.toString()));
	}
}
